$(document).ready(function(){
    $('.ml-admin-show-options').click(function(){
        $('.ml-admin-options').slideToggle();
        return false;
    });

    $('.ml-ajax-view').click(function(){
        $('.ml-admin-content').load(this.href);
        return false;
    });
    
    $('.ml-admin-title').click(function(){
        $(this).next('.ml-admin-panel').slideToggle();
        return false;
    });
});

/* Render the cleditor for textareas */
 $(document).ready(function() {
    $("#html_content").cleditor({width: '85%', height: 350});
 });

function setActive(link){
    $('.ml-admin-header-link li a.active').removeClass('active');
    $(link).addClass('active');
}